package com.ws.mbp.springsecuritydemo.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private Integer code;
    private String message;
    private Object data;
    public static R ok(Object data){
        return new R(200,"操作成功",data);
    }
    public static R error(String message){
        return new R(500,message,null);
    }
}
